package com.lam.system.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.validate.group.Add;

/**
 * 用户角色对象 sys_user_role
 * 
 * @author admin
 * @date 2022-09-01
 */
@TableName("sys_user_role")
public class SysUserRole implements BaseEntity{

	/** 主键 */
	@Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.AUTO)
    private String id;
    
    /** 用户id */
    @NotBlank(message = "用户id不能为空")
    @Size(max = 32, message = "用户id长度不能超过32个字符")
    private String userId;

    /** 角色id */
    @NotBlank(message = "角色id不能为空")
    @Size(max = 32, message = "角色id长度不能超过32个字符")
    private String roleId;
    
    public SysUserRole() {}

    public SysUserRole(String userId,String roleId) {
		this.userId = userId;
		this.roleId = roleId;
	}

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }    
    
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleId() {
        return roleId;
    }    
    

}
